import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './utils/request'
import ElementUI from 'element-ui';
import axios from 'axios'
import './assets/iconfontal/iconfontal.css'
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false
Vue.prototype.$api = axios
//存储以及判断路由的信息
router.beforeEach((to, from, next) => {
	//储存路由title
	store.commit('saverouter', to)
	if (localStorage.getItem('Authorization')) {
		store.commit('saveAuthorization', localStorage.getItem('Authorization'))
	}
	next()
})

new Vue({
	router,
	store,
	render: h => h(App)
}).$mount('#app')
